<?php

namespace app\controller;

use app\BaseController;
use think\facade\View;

class Index extends BaseController
{
    public function index()
    {
        // return '<style>*{ padding: 0; margin: 0; }</style><iframe src="https://www.thinkphp.cn/welcome?version=' . \think\facade\App::version() . '" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>';
        
        // 模板变量
        View::assign('title', 'title123');
        View::assign([
            'keywords' => 'keywords123',
            'description' => 'description123'
        ]);


        // 模板输出
        return view();
    }

    public function hello($name = 'ThinkPHP8')
    {
        return view('hello', ['name' => $name]);
    }
}
